BD=`pwd`
DATE=`date +%y%m%d_%H%M%S`
FD=$BD/$DATE/meminfo

mkdir -p $FD
cd $FD

echo -e "\e[1;42m Log path: \e[0m"$FD
adb root

i=0;while true;do echo "Saving :"$i".txt"; adb shell "dumpsys meminfo com.askey.dvr.dashcam -d" >> ./$i.txt ; egrep -r "Java Heap:|Native Heap:|TOTAL:" ./$i.txt; ((i++));sleep 60;done
